home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / X11 / julia / defines.h next >
Encoding:
C/C++ Source or Header  |  1995-05-03  |  2.3 KB  |  78 lines

  1. /*************************************************************************
  2.  *                                                                       *
  3.  *  Copyright (c) 1992, 1993 Ronald Joe Record                           *
  4.  *                                                                       *
  5.  *  All rights reserved. No part of this program or publication may be   *
  6.  *  reproduced, transmitted, transcribed, stored in a retrieval system,  *
  7.  *  or translated into any language or computer language, in any form or *
  8.  *  by any means, electronic, mechanical, magnetic, optical, chemical,   *
  9.  *  biological, or otherwise, without the prior written permission of:   *
  10.  *                                                                       *
  11.  *      Ronald Joe Record (408) 458-3718                                 *
  12.  *      212 Owen St., Santa Cruz, California 95062 USA                   *
  13.  *                                                                       *
  14.  *************************************************************************/
  15.  
  16. #include "x.h"
  17.  
  18. #define ABS(a)    (((a)<0) ? (0-(a)) : (a) )
  19. #define Min(x,y) ((x < y)?x:y)
  20. #define Max(x,y) ((x > y)?x:y)
  21.  
  22. /* Useful mathematical constants that should have been defined in math.h 
  23.  * M_LOG2E    - log2(e)
  24.  * M_LN2        - ln(2)
  25.  * M_PI        - pi
  26.  */
  27. #ifndef M_LOG2E
  28. #define M_LOG2E    1.4426950408889634074
  29. #endif
  30. #ifndef M_PI
  31. #define M_PI    3.14159265358979323846
  32. #endif
  33. #ifndef M_LN2
  34. #define M_LN2      6.9314718055994530942E-1 /*Hex  2^-1 * 1.62E42FEFA39EF */
  35. #endif
  36.  
  37. /* Useful machine-dependent values that should have been defined in values.h
  38.  * LN_MAXDOUBLE - the natural log of the largest double  -- log(MAXDOUBLE)
  39.  * LN_MINDOUBLE - the natural log of the smallest double -- log(MINDOUBLE)
  40.  */
  41. #ifndef LN_MINDOUBLE
  42. #define LN_MINDOUBLE (M_LN2 * (DMINEXP - 1))
  43. #endif
  44. #ifndef LN_MAXDOUBLE
  45. #define LN_MAXDOUBLE (M_LN2 * DMAXEXP)
  46. #endif
  47.  
  48. #ifndef TRUE
  49. #define TRUE 1
  50. #define FALSE 0
  51. #endif
  52.  
  53. #define MAXFRAMES 4
  54. #define DEF_WIDTH 4.0
  55. #define DEF_HEIGHT 3.0
  56. #define DEF_M_WIDTH 3.0
  57. #define DEF_M_HEIGHT 3.0
  58.  
  59. #define MAXDIVS  12
  60. #define STRIPE 7
  61.  
  62. typedef struct {
  63.     int x, y;
  64. } xy_t;
  65.  
  66. typedef struct {
  67.     int start_x, start_y;
  68.     int last_x, last_y;
  69.     } rubber_band_data_t;
  70.  
  71. typedef struct {
  72.     Cursor band_cursor;
  73.     double p_min, p_max, q_min, q_max;
  74.     rubber_band_data_t rubber_band;
  75.     } image_data_t;
  76.  
  77. typedef int (*PFI)();
  78.